#include <iostream>
using namespace std;

int main()
{
    int n = 0, count = 0;
    cin >> n;

    for (int i = 2; i < n; i++)
    {
        bool isPrimeN = 1;
        for (int j = i - 1; j > 1; j--)
            if (i % j == 0)
            {
                isPrimeN = 0;
                break;
            }
        if (isPrimeN == 1)
            count++;
    }

    cout << count;
    return 0;
}